package com.example.fw;

import org.openqa.selenium.By;

public class NavigationHelper extends HelperWithWebDriverBase {

	public NavigationHelper(ApplicationManager manager) {
		super(manager);		
	}

	public void goToGroupListPage() {
		linking("groups");
	}
	
	public void goToHomePage() {
		linking("home");
	}

	public void openMainPage() {
		String url = "http:/localhost/addressbookv4.1.4";
		openUrl(url);
	}

	protected void returnToHomePage() {
		linking("home page");
	}
	
	public void returnToGroupListPage() {
		linking("group page");
	}

	private void linking(String linkText) {
		By locator = By.linkText(linkText);
		click(locator);
	}

}
